Request Message Format
Type: WEBSOCKET
Description: Message schema for subscribing/unsubscribing to topics over WebSocket.
Parameters
Name | Type | Mandatory | Default | Description | Ranges |
---|---|---|---|---|---|
method | string | true | - | Operation to perform. | subscribe; unsubscribe |
params | array | true | - | One or more topic items like {topic}@{arg} . | "{topic}@{arg}" |
id | string | number | false | - | Client-assigned callback ID used for correlation. |
Request Examples
subscribe
{
"method": "subscribe",
"params": [
"{topic}@{arg},{arg}",
"{topic}@{arg}"
],
"id": "{id}" // callback ID
}
unsubscribe
{
"method": "unsubscribe",
"params": [
"{topic}@{arg},{arg}"
],
"id": "{id}" // callback ID
}
Response Example
Response
{
"rc": 0,
"mc": "SUCCESS",
"result": "SUBSCRIBED",
"id": "{id}"
}